SET DISPLAY MODE
This command will set the screen display mode if it is available on the current graphics card. SET DISPLAY MODE Width, Height, Depth Shi, VSyncOn SET DISPLAY MODE Width, Height, Depth, VSyncOn, Multisampling Factor, Multimonitor Mode Width Integer The width of the screen resolution to set Height Inthi halalalalalalalal allal ala kl;afjklfmklhe screen resolution to set Depth Integer The depth of the screen resolution of set boo VSyncOn Integer Set VSyncOn to a value of one will force the screen to use VSYNC and syncronise to the monitors refresh rate Multisampling Factor Integer Set Multisampling Factor to map direct to the D3DMULTISAMPLE_TYPE format in DirectX, ideal for setting multisampling screens for anitaliasing Multimonitor Mode Integer Set Multimonitor Mode to one in order to double the widge of the resolution, allowing a fullscreen application to expand to a second monitor or for some stereoscopic uses Notes added by College Man Width '- an integer value representing the width of the display mode required, given in pixels '''Height '- an integer value representing the height of the display mode required, given in pixels 'Depth '- an integer value representing the number of bits used to represent a single pixel on a screen. Typical values are 16, 24 or 32. Most systems today can handle 32 bits (this allows a single pixel to be set to one of several million colours). Note that your system, or more specifically, your graphics card, should be able to cope with the screen resolution required or you will get an error message. A reasonably 'safe' resolution (one that most video cards can handle) is 1024, 768, 32. To set the screen to the resolution of 1024 by 768 using 32 bit pixels, use the command '''SET DISPLAY MODE 1024, 768, 32 Note also that you can set your screen mode (different to display mode) to 'Desktop' or 'Windowed Fullscreen'. This will affect the look of of what you want to display on your screen. DarkBASIC Pro will still use the display mode you want but it will 'force' it into Desktop or Fullscreen mode and hence it may look 'stretched' or 'warped'. This command does not return a value. If this command fails, it will only generate a runtime warning in the CLI (Command Line Interface). A final EXE (Executable File) produced with this command will not cause your program to fail on machines that do not support the resolution. It is recommended, however, that you check the availability of the display mode before using this command. You can use the CHECK DISPLAY MODE() command to see whether the display mode is supported. It is vital to know that when this command is called, everything is deleted, including music and sound, so you must re-load all your assets after a call to this command. An additional property to force VSYNC on or off (cap to 60fps or not). Using SYNC RATE is something of a hack when compared to this new feature which creates a perfect VSYNC between the render and the monitor. The downside is that the VSYNC is fixed to the refresh of the monitor. Be aware that if the rendering area is stretched (usually via window desktop and window fullscreen modes), then it will not be a true framerate returned by "screen fps()". 8-Bit screen resolutions are not supported. cls set display mode 800,600,32 set window on maximize window wait 1000*8 print "screen width "+str$(screen width()) print "screen height "+str$(screen height()) print "screen depth "+str$(screen depth()) do loop end Category:DarkBASIC Professional Category:Display Commands